import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
// import $ from 'jquery'
import Third from './Third.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import commissionChangeApply from './order/commission/commissionChangeApply.vue'
import commissionChangeDetail from './order/commission/detail.vue'
import orderDetail from './order/detail/detail.vue'
import lang from 'element-ui/lib/locale/lang/en'
import locale from 'element-ui/lib/locale'
import DatePicker from './DatePicker.vue'

Vue.use(VueRouter);
Vue.use(VueResource);
Vue.use(ElementUI)
locale.use(lang)

const first = {template: '<div>This Is First {{$route.params.id +" into "+ $route.params.br }}</div>'}
const Foo = {template: '<div>foo</div>'}
const Bar = {template: '<div>bar</div>'}


const routes = [
    {name:'foo',path: '/foo', component: Third},
    {path: '/bar', component: Bar},
    {path:'/user/:id/:br',component : first},
    {name:'commissionChangeApply',path:'/commissionChangeApply/:orderId' , component:commissionChangeApply},
    {name:'commissionChangeDetail',path:'/commissionChangeDetail/:changeId',component:commissionChangeDetail},
        {name:'orderDetail',path:'/orderDetail/:orderId',component:orderDetail},
    {path:'/datePicker',component:DatePicker},
    {name:'third',path:'/third/:id',component:Third}
]
const router = new VueRouter({routes})

// const third = new Vue({
//     el: '#third',
//     render: h => h(Third)
// })


const app = new Vue({
    router: router,
    render: h => h(App)
}).$mount('#app')
